#pragma once

class Son;
class Dauther;
enum ClassType
{
	father,
	son,
	daughter
};

class __declspec(dllexport) Father
{
private:
	int id;
public :
	ClassType type;
	Father()
	{
		this->id = 3000;
		this->type = ClassType::father;
	}
	Father(const Father& src):id(src.id)
	{
	}
	void SetId(int id)
	{
		this->id = id;
	}
	double GetId()
	{
		return this->id;
	}
	/*bool operator ==(Father* father)
	{
		if (this->type == ClassType::father && this->type == father->type)
		{
			if (this->id == father->id)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else if (this->type == ClassType::son && this->type == father->type)
		{
			Son* thisPtr = static_cast<Son*>(this);
			Son* otherPtr = static_cast<Son*>(father);
			if (this->id == otherPtr->GetId() && thisPtr->year == otherPtr->year)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else if (this->type == ClassType::daughter && this->type == father->type)
		{
			Daughter* thisPtr = static_cast<Daughter*>(this);
			Daughter* otherPtr = static_cast<Daughter*>(father);
			if (this->id == otherPtr->GetId() && thisPtr->year == otherPtr->year)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	}*/
};

class __declspec(dllexport) Son :public Father
{
public:
	int year;
	Son()
	{
		this->type = ClassType::son;
	}
	Son(const Son& src) :Father(src),
		year(src.year)
	{
	}

};
class __declspec(dllexport) Daughter :public Father
{
public:
	int year;
	Daughter()
	{
		this->type = ClassType::daughter;
	}
	Daughter(const Daughter& src) :Father(src),
		year(src.year)
	{
	}

};

class House
{
public:

	House()
	{
	}
	House(const Father& father)
	{
		this->person1 = Father(father);
	}
	~House()
	{
		std::cout << "delete" << std::endl;
	}
	Father person1;

};
struct Ref
{
	int a;
	int b;
};
class Houses
{
public:
	int a;
	int b;
	int c;
	int d;
	int e;
	Ref f;
	Father g;
};
struct Ship
{
public:
	int a;
	int b;
	int c;
	int d;
	Ref e;
	Father f;
};


